/**
 * 
 */
package edu.unicen.compilers.actions;

import edu.unicen.compilers.lexicon.LexicalAnalyzer;
import edu.unicen.compilers.parser.Parser;

/**
 * @author mtrotti
 *
 */
public class SemanticAction14 extends SemanticAction {

	/**
	 * @param la
	 */
	public SemanticAction14(LexicalAnalyzer la, Parser parser) {
		super(la, parser);
	}

	/* (non-Javadoc)
	 * @see edu.unicen.compilers.actions.SemanticAction#execute()
	 */
	@Override
	public void execute() {
		if (la.getPartialLexeme().equalsIgnoreCase("!")){
			System.out.println("Warning: comparación incompleta se encontró ! sin =, se agrego el = la linea " + la.getLineNumber()) ;
			this.la.setLexeme(this.la.getPartialLexeme()+"=");
			this.la.setToken(DISTINTO);
		}else{
			System.out.println("Warning: carácter "+ la.getLastCharacter()+ " inválido ignorado en la linea " + la.getLineNumber()) ;
			System.out.println("TOKEN encontrado " + la.getPartialLexeme());
			this.la.setLexeme(this.la.getPartialLexeme());
		}
	}

}
